<template>
	<radio-group class="block" @change="RadioChange" :disabled="disabled">
		<view>
			<radio :disabled="disabled" v-for="(v,index) in list" class='black radio margin-right-sm' :class="value==index?'checked':''" :checked="value==index?true:false" :value="index + ''"><text class="margin-left-sm">{{v}}</text></radio>
		</view>
	</radio-group>
</template>

<script>
	export default{
		props: {
			list: {
				type: Array
			},
			value: {
				type: [Number, String]
			},
			disabled: {type:Boolean, default:() => {return false}}
		},
		data() {
			return {
			}
		},
		methods:{
			RadioChange(e) {
				// this.value = e.detail.value
				this.$emit("input", e.detail.value)
			},
		}
	}
</script>

<style>
</style>
